<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="CSS/CSS.css">
    <script>
        var _left = _top = 0;

        var myTime = function() {
            var d = new Date();//表明生成了一个日期对象
            var year = d.getFullYear();
            var month = d.getMonth();//从0开始
            var date = d.getDate();
            var week = d.getDay();
            var hour = d.getHours();
            var minute = d.getMinutes();
            var second = d.getSeconds();
            var ms = d.getMilliseconds();
            var pv = document.getElementById('p1');
            pv.textContent = '今天是 : 星期' + week + ' ' + year + '年' + (month + 1) + '月' + date + '日' + hour + ':' + minute + ':' + second;


            //window.setTimeout(myTime, 1000);
        };
        window.onload = function() {
            //setInterval 按照时间 间隔来循环执行
            //参数1: 脚本内容
            //参数2: 时间单位 (ms) 1000ms = 1s
            myTime();
            window.setInterval(myTime, 100);
        };
    </script>
</head>
<body>
<iframe name="sinaWeatherTool" src="http://weather.news.sina.com.cn/chajian/iframe/weatherStyle0.html?city=%E9%95%BF%E6%B2%99" width="200" height="20" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>
<p id="p1"style = 'position:absolute;right: 20px;top:0;font-size:12px;width:220px;height:20px'></p>
<center>
<b>美少女的HTML学习笔记</b>
<p>　　　　　　　　　　　　　　　　欧阳云蕾</p>

 </center>

</body>
</html>